home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / goldplay.zip / GOLDPLAY.DOC < prev    next >
Text File  |  1993-04-17  |  12KB  |  349 lines

  1. ───────────────────────────────────────────────────────────────────────────────
  2.                              GoldPlay ver 1.00
  3. ───────────────────────────────────────────────────────────────────────────────
  4.  
  5.      Programmed by
  6.            Sourcer of The CodeBlasters (Stein Norheim)
  7.  
  8.      Betatested and Bugfixed by
  9.            Robban of The SkyHawks (Robert Adolfsson)
  10.  
  11.      'DIGITAL.MOD' is composed by
  12.            Infinity of The CodeBlasters (Arttu Kataja)
  13.  
  14. ───────────────────────────────────────────────────────────────────────────────
  15.  
  16. GoldPlay 1.00 is distributed as SMILEWARE. That means that you may use and
  17. share this utility if :
  18.                      * You write who made the soundsystem
  19.  
  20.                      * You not make any changes in the package
  21.  
  22.                      * You send us a postcard from the town where you live.
  23.                        (our address is here below)
  24.  
  25. ───────────────────────────────────────────────────────────────────────────────
  26.  
  27. Send the postcard to :
  28.  
  29.                       Stein Norheim
  30.                       Klippvägen 15
  31.                       S-756 52 Uppsala
  32.                       SWEDEN
  33.  
  34. Feel free to write to us if you have any questions.
  35. You can also drop us a FAX at : +46-18 32 48 53  (in sweden: 018-32 48 53).
  36.  
  37. ───────────────────────────────────────────────────────────────────────────────
  38. ───────────────────────────────────────────────────────────────────────────────
  39. GoldPlay Documentation                                               Page 2
  40. ───────────────────────────────────────────────────────────────────────────────
  41.  
  42. 1.00 The Archive
  43.  
  44.    The Archive should consist of these files :
  45.  
  46.    DIGITAL .MOD          The Demo-Module
  47.    GOLDPLAY.OBJ          The Assembler-Object-file
  48.    GOLDPLAY.TPU          The TPascal-Unit (6.0)
  49.    GOLDPLAY.OVL          The TPascal-Overlay-file
  50.    GOLDPLAY.DOC          This Documentation
  51.    PLAY    .ASM          Demo-Program for Assembler
  52.    TESTPLAY.PAS          Demo-Program for TPascal
  53.  
  54. 1.01 Assembler..... of course !
  55.  
  56.    GoldPlays main-parts are all 100% pure Assembler-Code.
  57.  
  58. 1.02 The Overlay-File.... WHY ?
  59.  
  60.    GOLDPLAY.OVL is needed by the TPascal-version of GoldPlay. It consists
  61.    of some data to the player.
  62.  
  63. ───────────────────────────────────────────────────────────────────────────────
  64. GoldPlay Documentation                                               Page 3
  65. ───────────────────────────────────────────────────────────────────────────────
  66.  
  67. 2.00 The Procedures
  68.  
  69.    Here comes all procedures in GoldPlay, one by one.
  70.  
  71. ───────────────────────────────────────────────────────────────────────────────
  72. LOADOVL
  73. ───────────────────────────────────────────────────────────────────────────────
  74. Loads the overlay-file in the TPascal-version.
  75.  
  76. TPascal-Syntax:
  77.          LOADOVL(Filename:String);
  78.  
  79. TPascal-Example:
  80.  
  81.      Begin;
  82.      LoadOvl('GoldPlay.Ovl');         { Load the overlay into memory }
  83.  
  84.      ... {Play the module here}
  85.  
  86.      RemoveOvl;                       { Remove the overlay from memory }
  87.      End.
  88.  
  89. * Procedure is not needed in the assembler-version *
  90.  
  91. ───────────────────────────────────────────────────────────────────────────────
  92. REMOVEOVL
  93. ───────────────────────────────────────────────────────────────────────────────
  94. Loads the overlay-file in the TPascal-version.
  95.  
  96. TPascal-Syntax:
  97.      LOADOVL(Filename:String);
  98.  
  99. TPascal-Example: see LOADOVL
  100.  
  101. * Procedure is not needed in the assembler-version *
  102.  
  103. ───────────────────────────────────────────────────────────────────────────────
  104. ASKINIT                                                              Page 4
  105. ───────────────────────────────────────────────────────────────────────────────
  106. Asks the user for the soundsystem-setup.
  107.  
  108. TPascal-Syntax:
  109.      LOADOVL;
  110.  
  111. TPascal-Example:
  112.  
  113.      LoadOvl('GOLDPLAY.OVL');       { Load the overlay }
  114.      AskInit;                       { Ask user for setup }
  115.      Initialize;                    { Initialize the soundsystem }
  116.        ...
  117.  
  118. Assembler-Example:
  119.  
  120.      Call AskInit                   ; Ask use for setup
  121.      Call Initialize                ; Initialize the soundsystem
  122.  
  123. ───────────────────────────────────────────────────────────────────────────────
  124. INITIALIZE
  125. ───────────────────────────────────────────────────────────────────────────────
  126. Initializes the soundsystem for chosen setup.
  127.  
  128. Note : The soundsystem must be re-initialized every time you change the
  129. preferences.
  130.  
  131. Examples : See ASKINIT
  132.  
  133. ───────────────────────────────────────────────────────────────────────────────
  134. SETSYS
  135. ───────────────────────────────────────────────────────────────────────────────
  136. Allowes the programmer to set the preferences without using askinit
  137.  
  138. Note : This procedure is not needed when using the assembler-version.
  139.  
  140. Note : The variables SBDMA, SBIRQ, and SBPORT should be set to 1,7,220 when
  141.        not used. In the Assembler-version, these variables are by default
  142.        set to 1,7 and $220.
  143.  
  144. TPascal-Syntax:
  145.      SetSys(SoundDevice,Timerspeed,SBDMA,SBIRQ,SBPORT);
  146.  
  147. TPascal-Example:
  148.      SetSys(4,75,1,7,220); {Set Internal Honker at 16 kHz}
  149.      Initialize;
  150.  
  151. Assembler-Example:
  152.      Mov  Ax,Seg SoundDevice
  153.      Mov  Es,Ax                  ; Makes ES point to the player-segment
  154.  
  155.      Mov  Es:SoundDevice,4       ; Set Internal Honker
  156.      Mov  Es:TimerSpeed,75       ; Set 16 kHz (1193182/16000=75)
  157.  
  158.      ; No Need to set SBDMA, SBIRQ, SBPORT, because we are playing at the
  159.      ; Internal honker.
  160. ───────────────────────────────────────────────────────────────────────────────
  161. LOADMODULE                                                            Page 5
  162. ───────────────────────────────────────────────────────────────────────────────
  163. Allocates memory for a module, and loads it.
  164.  
  165. Note : In the Assembler version, Ds:Dx must point to and ASCIIZ-String with
  166.        the filename.
  167.  
  168. Note : In the TPascal-version, reduce the Pascal-Heap, so the module gets some
  169.        memory to live in. You do this with : {$M $4000,0,40000}
  170.  
  171. TPascal-Syntax:
  172.      LoadModule(Filename);
  173.  
  174. TPascal-Example:
  175.      Askinit;
  176.      Initialize;
  177.      LoadModule('Digital.Mod');      { File not found if ERROR<>0 }
  178.      StartPlaying;
  179.  
  180. Assembler-Example:
  181.  
  182.      .Data
  183.      Filename Db 'Digital.Mod',0
  184.      .Code
  185.      Mov  Ax,_Data
  186.      Mov  Ds,Ax
  187.  
  188.      Call Askinit
  189.      Call Initialize
  190.      Mov  Dx,Offset FileName
  191.      Call LoadModule                ; Carry set if error
  192.      Call StartPlaying
  193.  
  194. ───────────────────────────────────────────────────────────────────────────────
  195. STARTPLAYING
  196. ───────────────────────────────────────────────────────────────────────────────
  197. Starts playing the module.
  198.  
  199. Note : This procedure revectores IRQ0, it is therefore recommended to turn
  200.        the moduleplayer off before doing any floppy-disc-access.
  201.        DON'T DO MORE INTERRUPTS THAN YOU NEED WHEN YOU ARE PLAYING. DOING THIS
  202.        WILL LOWER THE REPLAYRATE DRASTICLY.
  203. TPascal-Syntax:
  204.      StartPlaying;
  205.  
  206. TPascal-Example:
  207.      StartPlaying;
  208.      Port[$21h]:=$5C;                  {Turns off IRQ 2,3,4, and 6}
  209.      Repeat until Port[$60]=1;         {Wait until ESCAPE is pressed}
  210.      Port[$21h]:=0;                    {Let all IRQ's live}
  211.      StopPlaying;
  212.  
  213. Assmebler-Example:
  214.      Call StartPlaying
  215.      Mov  Al,01011010b                 ; 5Ch
  216.      Out  21h,Al                       ; Turn off IRQ 2,3,4 and 6
  217.  
  218.      WaitESC:
  219.      In   Al,60h
  220.      Cmp  Al,1
  221.      Jne  WaitESC                      ; Wait for ESCAPE to be pressed
  222.  
  223.      Xor  Al,Al
  224.      Out  21h,Al
  225.      Call StopPlaying
  226. ───────────────────────────────────────────────────────────────────────────────
  227. STOPPLAYING                                                           Page 6
  228. ───────────────────────────────────────────────────────────────────────────────
  229. Stops playing the module, and restores IRQ0.
  230.  
  231. TPascal-Syntax:
  232.      StopPlaying;
  233.  
  234. Examples: See StartPlaying
  235.  
  236. ───────────────────────────────────────────────────────────────────────────────
  237. DEALLOC
  238. ───────────────────────────────────────────────────────────────────────────────
  239. Removes the module from the memory and deallocate the memory where the module
  240. was.
  241.  
  242. Note : You MUST ALWAYS deallocate and remove the old module before loading a
  243.        new.
  244.  
  245. TPascal-Syntax:
  246.       DeAlloc;
  247.  
  248. TPascal-Example:
  249.       Loadmodule('Digital.Mod');        { Load the module }
  250.       Dealloc;                          { Remove it again }
  251.  
  252. Assembler-Example;
  253.       Lea  Dx,FileName
  254.       Call LoadModule                   ; Load the module
  255.       Call DeAlloc                      ; Remove it
  256.  
  257. ───────────────────────────────────────────────────────────────────────────────
  258. MASTERVOLUME
  259. ───────────────────────────────────────────────────────────────────────────────
  260. Sets the mastervolume of the module.
  261.  
  262. Note : The mastervolume must be a value from 0 to 64.
  263.  
  264. TPascal-Syntax:
  265.      Mastervolume(Gain);
  266.  
  267. TPascal-Example;
  268.      For I:=64 downto 0 do              {Fade the volume down}
  269.      Begin;
  270.      MasterVolume(I);
  271.      Delay(10);                         {Wait 10 milliseconds}
  272.      End;
  273.  
  274. Assembler-Example;
  275.      Mov  Ax,Seg SoundDevice
  276.      Mov  Es,Ax                 ; Make ES Point to the PlayerSegment
  277.  
  278.      Mov  Cx,64
  279.      FadeDown:
  280.      Push Cx
  281.      Mov  Es:MasterVolume,Cx
  282.      Mov  Cx,300
  283.      Dummy:
  284.      Db   90h,90h,90h,90h         ; Four NOP's
  285.      Loop Dummy
  286.      Pop  Cx
  287.      Loop FadeDown
  288. ───────────────────────────────────────────────────────────────────────────────
  289. BOPBAR                                                                Page 7
  290. ───────────────────────────────────────────────────────────────────────────────
  291. Returns the 'BAR'-Value....  Nice for doing VU-Meters and so on.
  292.  
  293. Note : In the Assembler-version, there is no BOPBARS-function. You must access
  294.        the variables named BAR1, BAR2, BAR3 and BAR4 directly.
  295.  
  296. TPascal-Syntax:
  297.      I := BopBar(Channelnumber);
  298.  
  299. TPascal-Example:
  300.      BarHeight := BopBar(2);       { Returns the height of bar 2}
  301.  
  302. Assembler-Example:
  303.      Mov  Ax,Seg SoundDevice
  304.      Mov  Es,Ax                    ; Make ES Point to the PlayerSegment
  305.      Mov  Bx,Es:Bar2               ; Set BX to the height of bar 2
  306.  
  307. ───────────────────────────────────────────────────────────────────────────────
  308.  
  309. Remember to send your GOLDPLAY-Productions to us.
  310.  
  311. Hi's and Ho's goes to :
  312.  
  313.     ALL The CodeBlasters and The SkyHawks-members
  314.  
  315.                          AND
  316.  
  317.     Cascada, The SpacePigs, The Future-Crew, DCE, Ultra-Force, The Bogeyman,
  318.     The Scream Team, The Physical Crew, Skull, The Phoney Coders,
  319.     The Neoteric Crew, Maelstrom, SMA, and those I've forgotten.
  320.  
  321. Remember to send the postcard.....
  322.  
  323. ╓────────────────────────────────────────────────────────────────────────────╖
  324. ║ The Sounddevices:                                                          ║
  325. ║────────────────────────────────────────────────────────────────────────────║
  326. ║                        01  Soundplayer/Covox at LPT1  (Mono)               ║
  327. ║                        02  Soundplayer/Covox at LPT2  (Mono)               ║
  328. ║                        03  SoundBlaster               (Mono)               ║
  329. ║                        04  Internal Honker            (Mono)               ║
  330. ║                        05  Two Soundplayers LPT1+2    (Stereo)             ║
  331. ║                        06  SoundBlaster Pro           (Stereo)             ║
  332. ║                        07  Stereo SoundPlayer in LPT1 (Stereo)             ║
  333. ║                        08  Stereo SoundPlayer in LPT2 (Stereo)             ║
  334. ╙────────────────────────────────────────────────────────────────────────────╜
  335.  
  336. P.S. Have understanding for all spelling/grammattic-errors... It's hard to
  337.      think clear at 5 o'clock in the morning.... D.S.
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348. / Sourcer of The CodeBlasters, July the 17th, 1992
  349.